package yanc.app

class PayOrder {
//    private String synchroType;//同步类型 0  新增  1 修改  表中不需要对应字段
     String amountType;//货币种类  CNY
     String bank;//付款银行   银行名称 不需要转换
     String datas;//商户数据包 json    支付时使用的账号等信息
     String deviceId; //不一定每个都有
     String merchantNo;
     String merchantOrderNo;
     String openId;//用户id
     String orderName;//商品名称
     String orderNo;
     String orderTotalAmount;//金额  分
     Date transactionDate;//下单日期
     String transactionStatus;//交易状态  0  代付款  1 已支付   2  已取消
     String transactionType;//交易类型  0001  充值  0002 消费
     String payType;  //支付类型  0001 互联网账户支付  0002 支付宝支付  0003 微信支付  0004  银行卡支付
     Date payTime;//支付时间
     String dealNo;//交易流水号

    /**
     * 映射。
     */
    static mapping = {
        table "t_pay_order"
        version false
        orderNo(column: "order_no", sqlType: "varchar(200)")
        transactionDate(column: "transaction_date", sqlType: "datetime")
        merchantNo(column: "merchant_no", sqlType: "varchar(200)")
        deviceId(column: "device_id", sqlType: "varchar(200)")
        merchantOrderNo(column: "merchant_order_no", sqlType: "varchar(200)")
        openId(column: "open_id", sqlType: "varchar(200)")
        transactionType(column: "transaction_type", sqlType: "varchar(200)")
        transactionStatus(column: "transaction_status", sqlType: "varchar(200)")
        bank(column: "bank", sqlType: "varchar(200)")
        amountType(column: "amount_type", sqlType: "varchar(200)")
        orderTotalAmount(column: "order_total_amount", sqlType: "int")
        account(column: "account", sqlType: "int")
        orderName(column: "order_name", sqlType: "varchar(30)")
        datas(column: "datas", sqlType: "varchar(30)")
        payType(column: "pay_type", sqlType: "varchar(255)")
        payTime(column: "pay_time", sqlType: "datetime")
        dealNo(column: "deal_no", sqlType: "varchar(255)")
    }

    /**
     * 约束。
     */
    static constraints = {
        transactionDate(nullable: true, blank: true, unique: false)
        merchantNo(nullable: true, blank: true, unique: false)
        deviceId(nullable: true, blank: true, unique: false)
        orderNo(nullable: true, blank: true, unique: false)
        merchantOrderNo(nullable: true, blank: true, unique: false)
        openId(nullable: true, blank: true, unique: false)
        transactionType(nullable: true, blank: true, unique: false)
        transactionStatus(nullable: true, blank: true, unique: false)
        bank(nullable: true, blank: true, unique: false)
        amountType(nullable: true, blank: true, unique: false)
        orderTotalAmount(nullable: true, blank: true, unique: false)
        orderName(nullable: true, blank: true, unique: false)
        datas(nullable: true, blank: true, unique: false)
        payType(nullable: true, blank: true, unique: false)
        payTime(nullable: true, blank: true, unique: false)
        dealNo(nullable: true, blank: true, unique: false)
    }
}
